!!!
%html{:lang => "en", 'ng-app' => 'pigeon'}
  %head
    %meta{:charset => "utf-8"}/
    %title= @title
    %meta{:name => 'viewport', :content => "width=device-width,initial-scale=1,user-scalable=no"}/
    = stylesheet_link_tag "application"
    = stylesheet_link_tag 'weui-rails', media: 'all'
    -if File.exists?("#{Rails.root}/app/assets/stylesheets/#{controller_name}.scss") || File.exists?("#{Rails.root}/app/assets/stylesheets/#{controller_name}.css") || File.exists?("#{Rails.root}/app/assets/stylesheets/#{controller_name}.css.erb")
      = stylesheet_link_tag controller_name

    = javascript_include_tag "application"
    = javascript_include_tag "http://res.wx.qq.com/open/js/jweixin-1.0.0.js"
    = javascript_include_tag "http://api.map.baidu.com/api?v=2.0&ak=5eZINTQBxw6GVqCDPSNekac6L1coexBr"
    = javascript_include_tag 'pigeon'
    = wechat_config_js debug: false, api: %w(getLocation onMenuShareTimeline onMenuShareAppMessage onMenuShareQQ onMenuShareWeibo onMenuShareQZone)

    -if File.exists?("#{Rails.root}/app/assets/javascripts/#{controller_name}.coffee") || File.exists?("#{Rails.root}/app/assets/javascripts/#{controller_name}.js")
      = javascript_include_tag controller_name

  %body
    %input{"type"=>"hidden","id"=>"current_controller_name","value"=>"#{controller_name}"}
    %input{"type"=>"hidden","id"=>"current_action_name","value"=>"#{action_name}"}

    = yield

  = render 'wechats/dialog'
  = render 'wechats/toast'
  = render 'wechats/actionsheet'
  -if flash[:notice]
    :javascript
      jyd_toast({content: "#{flash[:notice]}"})
